import request from '@/utils/request'

/* 列表分页*/
export function selectCategoryTree(data) {
  return request({
    url: '/erp/category/selectCategoryTree',
    method: 'post',
    data: data
  })
}

/* 新增*/
export function saveCategory(data) {
  return request({
    url: '/erp/category/saveCategory',
    method: 'post',
    data: data
  })
}

/* 修改*/
export function updateCategory(data) {
  return request({
    url: '/erp/category/updateCategoryById',
    method: 'post',
    data: data
  })
}

/* 修改*/
export function selectCategoryById(data) {
  return request({
    url: '/erp/category/selectCategoryById/' + data,
    method: 'post'
  })
}

/* 删除*/
export function deleteCategory(data) {
  return request({
    url: '/erp/category/deleteCategory',
    method: 'post',
    data: data
  })
}
